package com.bibliotecachancay.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class AutorExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AutorExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andCodAutorIsNull() {
            addCriterion("COD_AUTOR is null");
            return (Criteria) this;
        }

        public Criteria andCodAutorIsNotNull() {
            addCriterion("COD_AUTOR is not null");
            return (Criteria) this;
        }

        public Criteria andCodAutorEqualTo(Integer value) {
            addCriterion("COD_AUTOR =", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorNotEqualTo(Integer value) {
            addCriterion("COD_AUTOR <>", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorGreaterThan(Integer value) {
            addCriterion("COD_AUTOR >", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorGreaterThanOrEqualTo(Integer value) {
            addCriterion("COD_AUTOR >=", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorLessThan(Integer value) {
            addCriterion("COD_AUTOR <", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorLessThanOrEqualTo(Integer value) {
            addCriterion("COD_AUTOR <=", value, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorIn(List<Integer> values) {
            addCriterion("COD_AUTOR in", values, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorNotIn(List<Integer> values) {
            addCriterion("COD_AUTOR not in", values, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorBetween(Integer value1, Integer value2) {
            addCriterion("COD_AUTOR between", value1, value2, "codAutor");
            return (Criteria) this;
        }

        public Criteria andCodAutorNotBetween(Integer value1, Integer value2) {
            addCriterion("COD_AUTOR not between", value1, value2, "codAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorIsNull() {
            addCriterion("NOM_AUTOR is null");
            return (Criteria) this;
        }

        public Criteria andNomAutorIsNotNull() {
            addCriterion("NOM_AUTOR is not null");
            return (Criteria) this;
        }

        public Criteria andNomAutorEqualTo(String value) {
            addCriterion("NOM_AUTOR =", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorNotEqualTo(String value) {
            addCriterion("NOM_AUTOR <>", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorGreaterThan(String value) {
            addCriterion("NOM_AUTOR >", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorGreaterThanOrEqualTo(String value) {
            addCriterion("NOM_AUTOR >=", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorLessThan(String value) {
            addCriterion("NOM_AUTOR <", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorLessThanOrEqualTo(String value) {
            addCriterion("NOM_AUTOR <=", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorLike(String value) {
            addCriterion("NOM_AUTOR like", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorNotLike(String value) {
            addCriterion("NOM_AUTOR not like", value, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorIn(List<String> values) {
            addCriterion("NOM_AUTOR in", values, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorNotIn(List<String> values) {
            addCriterion("NOM_AUTOR not in", values, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorBetween(String value1, String value2) {
            addCriterion("NOM_AUTOR between", value1, value2, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNomAutorNotBetween(String value1, String value2) {
            addCriterion("NOM_AUTOR not between", value1, value2, "nomAutor");
            return (Criteria) this;
        }

        public Criteria andNacionalidadIsNull() {
            addCriterion("NACIONALIDAD is null");
            return (Criteria) this;
        }

        public Criteria andNacionalidadIsNotNull() {
            addCriterion("NACIONALIDAD is not null");
            return (Criteria) this;
        }

        public Criteria andNacionalidadEqualTo(String value) {
            addCriterion("NACIONALIDAD =", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadNotEqualTo(String value) {
            addCriterion("NACIONALIDAD <>", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadGreaterThan(String value) {
            addCriterion("NACIONALIDAD >", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadGreaterThanOrEqualTo(String value) {
            addCriterion("NACIONALIDAD >=", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadLessThan(String value) {
            addCriterion("NACIONALIDAD <", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadLessThanOrEqualTo(String value) {
            addCriterion("NACIONALIDAD <=", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadLike(String value) {
            addCriterion("NACIONALIDAD like", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadNotLike(String value) {
            addCriterion("NACIONALIDAD not like", value, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadIn(List<String> values) {
            addCriterion("NACIONALIDAD in", values, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadNotIn(List<String> values) {
            addCriterion("NACIONALIDAD not in", values, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadBetween(String value1, String value2) {
            addCriterion("NACIONALIDAD between", value1, value2, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andNacionalidadNotBetween(String value1, String value2) {
            addCriterion("NACIONALIDAD not between", value1, value2, "nacionalidad");
            return (Criteria) this;
        }

        public Criteria andFecRegistroIsNull() {
            addCriterion("FEC_REGISTRO is null");
            return (Criteria) this;
        }

        public Criteria andFecRegistroIsNotNull() {
            addCriterion("FEC_REGISTRO is not null");
            return (Criteria) this;
        }

        public Criteria andFecRegistroEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO =", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroNotEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO <>", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroGreaterThan(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO >", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO >=", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroLessThan(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO <", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_REGISTRO <=", value, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroIn(List<Date> values) {
            addCriterionForJDBCDate("FEC_REGISTRO in", values, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroNotIn(List<Date> values) {
            addCriterionForJDBCDate("FEC_REGISTRO not in", values, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("FEC_REGISTRO between", value1, value2, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecRegistroNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("FEC_REGISTRO not between", value1, value2, "fecRegistro");
            return (Criteria) this;
        }

        public Criteria andFecModificacionIsNull() {
            addCriterion("FEC_MODIFICACION is null");
            return (Criteria) this;
        }

        public Criteria andFecModificacionIsNotNull() {
            addCriterion("FEC_MODIFICACION is not null");
            return (Criteria) this;
        }

        public Criteria andFecModificacionEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION =", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionNotEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION <>", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionGreaterThan(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION >", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION >=", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionLessThan(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION <", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("FEC_MODIFICACION <=", value, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionIn(List<Date> values) {
            addCriterionForJDBCDate("FEC_MODIFICACION in", values, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionNotIn(List<Date> values) {
            addCriterionForJDBCDate("FEC_MODIFICACION not in", values, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("FEC_MODIFICACION between", value1, value2, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andFecModificacionNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("FEC_MODIFICACION not between", value1, value2, "fecModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroIsNull() {
            addCriterion("USU_REGISTRO is null");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroIsNotNull() {
            addCriterion("USU_REGISTRO is not null");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroEqualTo(String value) {
            addCriterion("USU_REGISTRO =", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroNotEqualTo(String value) {
            addCriterion("USU_REGISTRO <>", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroGreaterThan(String value) {
            addCriterion("USU_REGISTRO >", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroGreaterThanOrEqualTo(String value) {
            addCriterion("USU_REGISTRO >=", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroLessThan(String value) {
            addCriterion("USU_REGISTRO <", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroLessThanOrEqualTo(String value) {
            addCriterion("USU_REGISTRO <=", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroLike(String value) {
            addCriterion("USU_REGISTRO like", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroNotLike(String value) {
            addCriterion("USU_REGISTRO not like", value, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroIn(List<String> values) {
            addCriterion("USU_REGISTRO in", values, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroNotIn(List<String> values) {
            addCriterion("USU_REGISTRO not in", values, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroBetween(String value1, String value2) {
            addCriterion("USU_REGISTRO between", value1, value2, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuRegistroNotBetween(String value1, String value2) {
            addCriterion("USU_REGISTRO not between", value1, value2, "usuRegistro");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionIsNull() {
            addCriterion("USU_MODIFICACION is null");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionIsNotNull() {
            addCriterion("USU_MODIFICACION is not null");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionEqualTo(String value) {
            addCriterion("USU_MODIFICACION =", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionNotEqualTo(String value) {
            addCriterion("USU_MODIFICACION <>", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionGreaterThan(String value) {
            addCriterion("USU_MODIFICACION >", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionGreaterThanOrEqualTo(String value) {
            addCriterion("USU_MODIFICACION >=", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionLessThan(String value) {
            addCriterion("USU_MODIFICACION <", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionLessThanOrEqualTo(String value) {
            addCriterion("USU_MODIFICACION <=", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionLike(String value) {
            addCriterion("USU_MODIFICACION like", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionNotLike(String value) {
            addCriterion("USU_MODIFICACION not like", value, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionIn(List<String> values) {
            addCriterion("USU_MODIFICACION in", values, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionNotIn(List<String> values) {
            addCriterion("USU_MODIFICACION not in", values, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionBetween(String value1, String value2) {
            addCriterion("USU_MODIFICACION between", value1, value2, "usuModificacion");
            return (Criteria) this;
        }

        public Criteria andUsuModificacionNotBetween(String value1, String value2) {
            addCriterion("USU_MODIFICACION not between", value1, value2, "usuModificacion");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}